<?php
namespace Models;

/**
 * 退换货模型
 * @package Models
 * @author 江羿平<hugcolin@163.com>
 */
class Refund extends Model
{
	protected $_table = 'refunds';

	protected $_filter = FALSE;

	protected $_primekey = 'id';

	protected $_belongs = [
		'order' => [
			'class' => Order::Class,
			'foreign' => 'id',
			'belongs_key' => 'order_id',
		],
		'order_item'=>[
			'class' => Order_item::Class,
			'foreign' => 'id',
			'belongs_key' => 'order_item_id',
		],
		'product'=>[
			'class' => Product::Class,
			'foreign' => 'id',
			'belongs_key' => 'product_id',
		],
		'item'=>[
			'class' => Item::Class,
			'foreign' => 'id',
			'belongs_key' => 'item_id',
		],
		'cashier'=>[
			'class' => Cashier::Class,
			'foreign' => 'id',
			'belongs_key' => 'cashier_id',
		],
	];
}
?>
